package com.net.xpay.common.domain;

import com.net.common.domain.CommonDomain;
import com.net.xpay.common.enums.safePay.UniTransStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 记账本资金调拨记录
 */
@Getter
@Setter
@NoArgsConstructor
public class BookAccountTransferOrder extends CommonDomain {
    @ApiModelProperty(notes = "用户id")
    private Long userId;

    @ApiModelProperty(notes = "明细外部订单号")
    private String outBizNo;

    @ApiModelProperty(notes = "外部业务单号")
    private String importBizNo;

    /**
     * 付款方
     */

    @ApiModelProperty(notes = "付款方账号id")
    private Long payerSafePayBookAccountId;

    @ApiModelProperty(notes = "付款方支付宝账号")
    private String payerAlipayAccount;

    @ApiModelProperty(notes = "付款方支付宝签约协议号")
    private String payerAgreementNo;

    @ApiModelProperty(notes = "付款方资金记账本id")
    private String payerBookId;

    /**
     * 收款方
     */
    @ApiModelProperty(notes = "收款方账号id")
    private Long payeeSafePayBookAccountId;

    @ApiModelProperty(notes = "收款方支付宝账号")
    private String payeeAlipayAccount;

    @ApiModelProperty(notes = "收款方支付宝签约协议号")
    private String payeeAgreementNo;

    @ApiModelProperty(notes = "收款方资金记账本id")
    private String payeeBookId;

    /**
     * 转账信息
     */
    @ApiModelProperty(notes = "转账业务的标题，用于在支付宝用户的账单里显示")
    private String orderTitle;

    @ApiModelProperty(notes = "在单笔金额超过 50000 的时候必传。")
    private String remark;

    @ApiModelProperty(notes = "明细金额 单位为元（最小1元），精确到小数点后两位 必选")
    private BigDecimal transAmount;

    @ApiModelProperty(notes = "支付宝支付资金流水号，仅当转账成功才会返回该参数")
    private String payFundOrderId;

    @ApiModelProperty(notes = "支付宝转账单据号")
    private String orderId;

    @ApiModelProperty(notes = "状态")
    private UniTransStatus status;

    @ApiModelProperty(notes = "开始触发打款时间")
    private LocalDateTime startTime;

    @ApiModelProperty(notes = "打款成功完成时间")
    private LocalDateTime transDate;

    @ApiModelProperty(notes = "完成时间")
    private LocalDateTime endTime;

    @ApiModelProperty(notes = "明细失败错误码")
    private String errorCode;

    @ApiModelProperty(notes = "明细失败错误原因")
    private String errorMsg;
}
